package com.it.myd.config;

import com.it.myd.websocket.socket.match.JoinMatchWebSocket;
import com.it.myd.websocket.socket.wuziqi.WuziqiMatchWebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.*;

@Configuration
@EnableWebSocket
public class WebSocketConfig implements WebSocketConfigurer {


    @Autowired
    private JoinMatchWebSocket joinMatchWebSocket;
    @Autowired
    private WuziqiMatchWebSocket wuziqiMatchWebSocket;
    @Override
    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
        registry.addHandler(joinMatchWebSocket, "/joinMatch");
        registry.addHandler(wuziqiMatchWebSocket, "/wuziqiroom");
    }
}
